In [1]:
install.packages("igraph")
library(igraph)
Installing package into 'C:/Users/Shane/Documents/R/win-library/3.6'
(as 'lib' is unspecified)

package 'igraph' successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\Shane\AppData\Local\Temp\RtmpiybAjp\downloaded_packages
Warning message:
"package 'igraph' was built under R version 3.6.3"

Attaching package: 'igraph'


The following objects are masked from 'package:stats':

    decompose, spectrum


The following object is masked from 'package:base':

    union


In [2]:
g1 <- read.graph("https://raw.githubusercontent.com/mdurazob/covidnotebook/master/AbstractsCovid19.graphml", format="graphml")
In [4]:
library(igraph)
V(g1)
+ 2930/2930 vertices, from 27cd00d:
   [1]    1    2    3    4    5    6    7    8    9   10   11   12   13   14
  [15]   15   16   17   18   19   20   21   22   23   24   25   26   27   28
  [29]   29   30   31   32   33   34   35   36   37   38   39   40   41   42
  [43]   43   44   45   46   47   48   49   50   51   52   53   54   55   56
  [57]   57   58   59   60   61   62   63   64   65   66   67   68   69   70
  [71]   71   72   73   74   75   76   77   78   79   80   81   82   83   84
  [85]   85   86   87   88   89   90   91   92   93   94   95   96   97   98
  [99]   99  100  101  102  103  104  105  106  107  108  109  110  111  112
 [113]  113  114  115  116  117  118  119  120  121  122  123  124  125  126
 [127]  127  128  129  130  131  132  133  134  135  136  137  138  139  140
+ ... omitted several vertices
In [5]:
library(igraph)

nodesofinterest <- c("therapeutic vaccine", "vaccine candidate")

# select the nodes having these names
nodesselection <- V(g1)[label %in% nodesofinterest]
# get their  neighborhood 
egoneighborhood <- ego(g1, order=1, nodes = nodesselection, mode = "all", mindist = 0)

# turn the returned list into a graph
egoselection <- induced_subgraph(g1,unlist(egoneighborhood))

V(egoselection)
+ 739/739 vertices, from 5ea2fcd:
  [1]   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18
 [19]  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36
 [37]  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54
 [55]  55  56  57  58  59  60  61  62  63  64  65  66  67  68  69  70  71  72
 [73]  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89  90
 [91]  91  92  93  94  95  96  97  98  99 100 101 102 103 104 105 106 107 108
[109] 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
[127] 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
[145] 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
[163] 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
+ ... omitted several vertices
In [6]:
install.packages("GGally")
library(GGally)
Installing package into 'C:/Users/Shane/Documents/R/win-library/3.6'
(as 'lib' is unspecified)

package 'GGally' successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\Shane\AppData\Local\Temp\RtmpiybAjp\downloaded_packages
Warning message:
"package 'GGally' was built under R version 3.6.3"
Loading required package: ggplot2

Warning message:
"package 'ggplot2' was built under R version 3.6.3"
Registered S3 method overwritten by 'GGally':
  method from   
  +.gg   ggplot2

In [7]:
install.packages("sna")
library(sna)
Installing package into 'C:/Users/Shane/Documents/R/win-library/3.6'
(as 'lib' is unspecified)

package 'sna' successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\Shane\AppData\Local\Temp\RtmpiybAjp\downloaded_packages
Warning message:
"package 'sna' was built under R version 3.6.3"
Loading required package: statnet.common

Warning message:
"package 'statnet.common' was built under R version 3.6.3"

Attaching package: 'statnet.common'


The following object is masked from 'package:base':

    order


Loading required package: network

Warning message:
"package 'network' was built under R version 3.6.3"
network: Classes for Relational Data
Version 1.16.0 created on 2019-11-30.
copyright (c) 2005, Carter T. Butts, University of California-Irvine
                    Mark S. Handcock, University of California -- Los Angeles
                    David R. Hunter, Penn State University
                    Martina Morris, University of Washington
                    Skye Bender-deMoll, University of Washington
 For citation information, type citation("network").
 Type help("network-package") to get started.



Attaching package: 'network'


The following objects are masked from 'package:igraph':

    %c%, %s%, add.edges, add.vertices, delete.edges, delete.vertices,
    get.edge.attribute, get.edges, get.vertex.attribute, is.bipartite,
    is.directed, list.edge.attributes, list.vertex.attributes,
    set.edge.attribute, set.vertex.attribute


sna: Tools for Social Network Analysis
Version 2.5 created on 2019-12-09.
copyright (c) 2005, Carter T. Butts, University of California-Irvine
 For citation information, type citation("sna").
 Type help(package="sna") to get started.



Attaching package: 'sna'


The following objects are masked from 'package:igraph':

    betweenness, bonpow, closeness, components, degree, dyad.census,
    evcent, hierarchy, is.connected, neighborhood, triad.census


In [8]:
library(network)
library(intergraph)

ggnet2(egoselection, mode = 'fruchtermanreingold', node.size="weightlinks", node.color = "cluster", label = "label", label.size=2.5, palette="Dark2", alpha = 0.75, edge.alpha = 0.2, size.legend = NULL, size.min = 1000) + theme(legend.position = "none")
Error in library(intergraph): there is no package called 'intergraph'
Traceback:

1. library(intergraph)
In [9]:
install.packages("sigmajs")
library(sigmajs)
Installing package into 'C:/Users/Shane/Documents/R/win-library/3.6'
(as 'lib' is unspecified)

package 'sigmajs' successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\Shane\AppData\Local\Temp\RtmpiybAjp\downloaded_packages
Warning message:
"package 'sigmajs' was built under R version 3.6.3"
Welcome to sigmajs

Docs: sigmajs.john-coene.com

In [10]:
reducedgraph <- "https://raw.githubusercontent.com/mdurazob/covidnotebook/master/VaccineGraphReduced.gexf"

vaccineInteractive <- sigmajs() %>% 
  sg_from_gexf(reducedgraph) %>% 
  sg_settings(drawLabels = TRUE, drawEdges = FALSE, labelThreshold = 4, labelSize = 10)

vaccineInteractive
In [11]:
library(sigmajs)

cluster1graph <- "https://raw.githubusercontent.com/mdurazob/covidnotebook/master/Cluster1.gexf"

cluster1interactive <- sigmajs() %>% 
  sg_from_gexf(cluster1graph) %>% 
  sg_settings(drawLabels = TRUE, drawEdges = FALSE, labelThreshold = 4, labelSize = 10)

cluster1interactive
In [12]:
install.packages("networkD3")
## Installing package into '/usr/local/lib/R/site-library'
## (as 'lib' is unspecified)
Installing package into 'C:/Users/Shane/Documents/R/win-library/3.6'
(as 'lib' is unspecified)

package 'networkD3' successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\Shane\AppData\Local\Temp\RtmpiybAjp\downloaded_packages
In [14]:
library(networkD3)
edges <- read.csv(file ="https://raw.githubusercontent.com/mdurazob/covidnotebook/master/edgescluster1.csv")
nodes <- read.csv(file = "https://raw.githubusercontent.com/mdurazob/covidnotebook/master/nodescluster1.csv")

d <- sankeyNetwork(Links = edges, Nodes = nodes, Source = "Source", Target = "Target", 
                NodeID = "name", Value = "Weight", # LinkGroup = "colour", (use if you want to colour edges)
                fontSize = 14, fontFamily = "sans-serif", width = "100%")

d
In [15]:
install.packages("highcharter")
library(highcharter)
Installing package into 'C:/Users/Shane/Documents/R/win-library/3.6'
(as 'lib' is unspecified)

also installing the dependencies 'XML', 'data.table', 'stringi', 'generics', 'reshape2', 'TTR', 'curl', 'rlist', 'zoo', 'stringr', 'broom', 'xts', 'quantmod', 'tidyr', 'lubridate', 'whisker'


  There is a binary version available but the source version is later:
         binary source needs_compilation
reshape2  1.4.3  1.4.4              TRUE

  Binaries will be installed
package 'XML' successfully unpacked and MD5 sums checked
package 'data.table' successfully unpacked and MD5 sums checked
package 'stringi' successfully unpacked and MD5 sums checked
package 'generics' successfully unpacked and MD5 sums checked
package 'reshape2' successfully unpacked and MD5 sums checked
package 'TTR' successfully unpacked and MD5 sums checked
package 'curl' successfully unpacked and MD5 sums checked
package 'rlist' successfully unpacked and MD5 sums checked
package 'zoo' successfully unpacked and MD5 sums checked
package 'stringr' successfully unpacked and MD5 sums checked
package 'broom' successfully unpacked and MD5 sums checked
package 'xts' successfully unpacked and MD5 sums checked
package 'quantmod' successfully unpacked and MD5 sums checked
package 'tidyr' successfully unpacked and MD5 sums checked
package 'lubridate' successfully unpacked and MD5 sums checked
package 'whisker' successfully unpacked and MD5 sums checked
package 'highcharter' successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\Shane\AppData\Local\Temp\RtmpiybAjp\downloaded_packages
Warning message:
"package 'highcharter' was built under R version 3.6.3"
Registered S3 method overwritten by 'quantmod':
  method            from
  as.zoo.data.frame zoo 

Highcharts (www.highcharts.com) is a Highsoft software product which is

not free for commercial and Governmental use


Attaching package: 'highcharter'


The following object is masked from 'package:networkD3':

    JS


In [16]:
inhibitionpapers <- read.csv("https://raw.githubusercontent.com/mdurazob/covidnotebook/master/InhibitionPapers.csv")
inhibitionchart <- inhibitionpapers %>% 
hchart('bubble', hcaes(x = 'Name', y = 'Year', size = 'Citations', color='Year')) %>% 
hc_tooltip(pointFormat = "<b>Title: {point.Title}</b><br> <b>Keyword: {point.Name}</b><br> Fragment: {point.Abstract}")
Warning message:
"`parse_quosure()` is deprecated as of rlang 0.2.0.
Please use `parse_quo()` instead.
This warning is displayed once per session."
Warning message:
"`as_data_frame()` is deprecated as of tibble 2.0.0.
Please use `as_tibble()` instead.
The signature and semantics have changed, see `?as_tibble`.
This warning is displayed once every 8 hours.
Call `lifecycle::last_warnings()` to see where this warning was generated."
In [17]:
library(highcharter)
install.packages("treemap")
Installing package into 'C:/Users/Shane/Documents/R/win-library/3.6'
(as 'lib' is unspecified)

also installing the dependency 'gridBase'


package 'gridBase' successfully unpacked and MD5 sums checked
package 'treemap' successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\Shane\AppData\Local\Temp\RtmpiybAjp\downloaded_packages
In [18]:
library(treemap)
install.packages("viridis")
Warning message:
"package 'treemap' was built under R version 3.6.3"
Installing package into 'C:/Users/Shane/Documents/R/win-library/3.6'
(as 'lib' is unspecified)

also installing the dependency 'gridExtra'


package 'gridExtra' successfully unpacked and MD5 sums checked
package 'viridis' successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\Shane\AppData\Local\Temp\RtmpiybAjp\downloaded_packages
In [19]:
library(viridis)
Warning message:
"package 'viridis' was built under R version 3.6.3"
Loading required package: viridisLite

Warning message:
"package 'viridisLite' was built under R version 3.6.3"
In [20]:
install.packages("RColorBrewer")
Installing package into 'C:/Users/Shane/Documents/R/win-library/3.6'
(as 'lib' is unspecified)

package 'RColorBrewer' successfully unpacked and MD5 sums checked

The downloaded binary packages are in
	C:\Users\Shane\AppData\Local\Temp\RtmpiybAjp\downloaded_packages
In [22]:
library(RColorBrewer)

adepapers <- read.csv("https://raw.githubusercontent.com/mdurazob/covidnotebook/master/ADEPapers.csv")

hchart(adepapers, "treemap", hcaes(x = Name, value = Citations, color = Year))%>% 
hc_tooltip(pointFormat = "<b>Title: {point.Title}</b><br> <b>Keyword: {point.Name}</b><br> Fragment: {point.Abstract}") %>% 
  hc_colorAxis(minColor = brewer.pal(9, "Greens")[4],
               maxColor = brewer.pal(9, "Blues")[9])
In [23]:
library(highcharter)
animalmodelspapers <- read.csv("https://raw.githubusercontent.com/mdurazob/covidnotebook/master/AnimalModelsPapers.csv")

animalmodelschart <- animalmodelspapers %>% 
hchart('bubble', hcaes(x = 'Name', y = 'Year', size = 'Citations', color='Year')) %>% 
hc_tooltip(pointFormat = "<b>Title: {point.Title}</b><br> <b>Keyword: {point.Name}</b><br> Fragment: {point.Abstract}") 

animalmodelschart
In [24]:
library(highcharter)
library(treemap)
library(viridis)
library(RColorBrewer)

therapeuticspapers <- read.csv("https://raw.githubusercontent.com/mdurazob/covidnotebook/master/therapeuticspapers.csv")

hchart(therapeuticspapers, "treemap", hcaes(x = Name, value = Citations, color = Year))%>% 
hc_tooltip(pointFormat = "<b>Title: {point.Title}</b><br> <b>Keyword: {point.Name}</b><br> Fragment: {point.Abstract}") %>% 
  hc_colorAxis(minColor = brewer.pal(9, "Greens")[4],
               maxColor = brewer.pal(9, "Blues")[9])
In [25]:
library(highcharter)
economicspapers <- read.csv("https://raw.githubusercontent.com/mdurazob/covidnotebook/master/economicsPapers.csv")

economicschart <- economicspapers %>% 
hchart('bubble', hcaes(x = 'Name', y = 'Year', size = 'Citations', color='Year')) %>% 
hc_tooltip(pointFormat = "<b>Title: {point.Title}</b><br> <b>Keyword: {point.Name}</b><br> Fragment: {point.Abstract}") 

economicschart
In [26]:
library(highcharter)
library(treemap)
library(viridis)
library(RColorBrewer)

standarizationpapers <- read.csv("https://raw.githubusercontent.com/mdurazob/covidnotebook/master/AnimalStandardized.csv")

hchart(standarizationpapers, "treemap", hcaes(x = Name, value = Citations, color = Year))%>% 
hc_tooltip(pointFormat = "<b>Title: {point.Title}</b><br> <b>Keyword: {point.Name}</b><br> Fragment: {point.Abstract}") %>% 
  hc_colorAxis(minColor = brewer.pal(9, "Greens")[4],
               maxColor = brewer.pal(9, "Blues")[9])
In [27]:
library(highcharter)
prophylaxispapers <- read.csv("https://raw.githubusercontent.com/mdurazob/covidnotebook/master/prophylaxispapers.csv")

prophylaxischart <- prophylaxispapers %>% 
hchart('bubble', hcaes(x = 'Name', y = 'Year', size = 'Citations', color='Year')) %>% 
hc_tooltip(pointFormat = "<b>Title: {point.Title}</b><br> <b>Keyword: {point.Name}</b><br> Fragment: {point.Abstract}") 

prophylaxischart
In [28]:
library(highcharter)
library(treemap)
library(viridis)
library(RColorBrewer)

aftervaccinepapers <- read.csv("https://raw.githubusercontent.com/mdurazob/covidnotebook/master/aftervaccinepapers.csv")

hchart(aftervaccinepapers, "treemap", hcaes(x = Name, value = Citations, color = Year))%>% 
hc_tooltip(pointFormat = "<b>Title: {point.Title}</b><br> <b>Keyword: {point.Name}</b><br> Fragment: {point.Abstract}") %>% 
  hc_colorAxis(minColor = brewer.pal(9, "Greens")[4],
               maxColor = brewer.pal(9, "Blues")[9])
In [ ]: